const { paths } = require('./utils');

const browserSync = require('browser-sync').create();

function serve(done) {
  browserSync.init({
    server: {
      baseDir: paths.DIST_PATH,
    },
    port: 3000,
    reloadDebounce: 500,
  });

  done();
}

function serveReload(done) {
  browserSync.reload();

  done();
}

exports.serve = serve;
exports.serveReload = serveReload;
